import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class SteveFrame extends JFrame implements WindowListener
{
    public SteveComponent child;
    
    public SteveFrame ()
    {
        super("Testing Interpolation Methods");
        this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        this.addWindowListener(this);
        this.init(new Dimension(Settings.width, Settings.height));
        this.setLocationByPlatform(true);
        this.setVisible(true);
    }
    
    public void init (Dimension size)
    {
        child = new SteveComponent();
        child.setPreferredSize(size);
        add(child);
        pack();
        child.init(size);
    }
    public void stop ()
    {
        child.stop();
    }
    
    public void windowClosing (WindowEvent ev)
    {
        this.stop();
        this.dispose();
    }
    public void windowDeactivated (WindowEvent ev) {}
    public void windowActivated (WindowEvent ev) {}
    public void windowDeiconified (WindowEvent ev) {}
    public void windowIconified (WindowEvent ev) {}
    public void windowClosed (WindowEvent ev) {}
    public void windowOpened (WindowEvent ev) {}
    
    public static void main (String[] args)
    {
        new SteveFrame();
    }
}
